{extend name="public/base"/}
{block name="style"}
<link rel="stylesheet" type="text/css" href="__PUBLIC__/writer/style/books.css">
{/block}
{block name="body"}
    {include file="public/topmenu" /}
    {include file="public/changepwd" /}
    <div class="mainWrap pageCenter cf">     
        {include file="public/leftmenu" /}
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/writer/style/timing_plugin.css">
        <link charset="utf-8" rel="stylesheet" href="__PUBLIC__/writer/style/DatePicker.css">
        <link charset="utf-8" rel="stylesheet" href="__PUBLIC__/writer/style/Dropdown.css">
        <link charset="utf-8" rel="stylesheet" href="__PUBLIC__/writer/style/TimePicker.css">
        <link charset="utf-8" rel="stylesheet" href="__PUBLIC__/writer/style/Popup.css">
        <script id="mce_5" type="text/javascript" src="__PUBLIC__/writer/js/plugin.min.js"></script>
        <link rel="stylesheet" type="text/css" id="u0" href="__PUBLIC__/writer/style/skin.min.css">
        <div class="mainRight pb0 fl">
            <div class="crumbsWrap">
                <b></b>
                <i class="before"><a href="{:url('writer/booknovels/index')}"><span>作品管理</span></a></i>
                <em class="diff"></em>
                <i class="current"><span>{$book['title']}</span></i>
            </div>
            <div class="msgBoxTitle">
                <!--id="createDraftIconBtn"-->

               <a class="create button" href="{:url('writer/booknovels/addchapter',['bookid'=>$book['id']])}"><em class="icon"></em>新建章节</a>
                        <!--<span class="minTipBox"><b class="down"></b><cite class="icon close"></cite>点此按钮即可新建章节</span>-->      <div class="tabSwitch cf">

					<span ><a href="{:url('writer/booknovels/info',['bookid'=>$book['id']])}">作品设置</a></span>
                    <span><a href="{:url('writer/booknovels/draft',['bookid'=>$book['id']])}">草稿箱</a></span>
                    <span ><a href="{:url('writer/booknovels/publish',['bookid'=>$book['id']])}">已发布章节</a></span>
                    <span class="act"><a href="{:url('writer/booknovels/recycle',['bookid'=>$book['id']])}">回收站</a></span> 
                    
                </div>
            </div>
            <div class="managerWrap cf">
                <div class="mLeftList fl">
                    <div id="draftListWrap" class="leftListWrap">
                        <div class="titleBox">
                            <p>共{$chapters|count}章（超过30天章节自动清除）</p>
                        </div>
                        <div class="sectionManage">
							<div class="sectionList" id="sectionList">
								<!-- 回收站列表 -->
								<ul id="draftList">
                                        {volist name="chapters" id="vo"}
                                        <li data-chapterid="{$vo['id']}" data-volumeid="27543902912775723" {if $key==0}class="act"{/if}>
                                            <div class="sectionBox">
                                                <p>
                                                    <em>{$vo['chaptername']}</em>
                                                </p>
                                                <p class="f12">
                                                    <i>
                                                        30天后清除                                            
                                                    </i>
                                                    共{$vo['size']}字
                                                </p>
                                            </div>
                                        </li>                        
                                        {/volist}
                                    </ul>
							</div>
						</div>
					</div>
				</div>

                <div id="chapterContainer" class="mRightContent fl">
                    <!--查看章节-->
                    <div id="viewChapterBox" class="midWrap viewWrap hidden" style="display: block;">
                        <div class="sectionViewWrap section-pre-view">
                            <div id="portamento_container" style="min-height: 48px; width: 809px;"><div id="viewChapterBtnBox" class="sectionBtnBox cf" data-slide="1" style="top: 0px;">
                                <div class="titleBtn fr">
                                    <a id="deleteChapterBtn" class="button white" href="javascript:">彻底删除</a>
                                    <a id="recoverChapterBtn" class="button modify" href="javascript:">恢复为草稿</a>
                                </div>
                                <em class="c999">章节类型：</em>
                                <b data-node="chapterTypeName">公众章节</b>
                            </div></div>
                            <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 640px;"><div id="sectionText" class="zwText" style="overflow: hidden; width: auto; height: 640px;">
                                <h3 id="chapterTitle"></h3>
                                <div id="chapterContent"><p></p><br></div>
                            </div><div class="slimScrollBar" style="background: rgb(204, 204, 204); width: 7px; position: absolute; top: 0px; opacity: 1; display: none; border-radius: 0px; z-index: 99; right: 1px; height: 650px;"></div><div class="slimScrollRail" style="width: 7px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 7px; background: rgb(238, 238, 238); opacity: 1; z-index: 90; right: 1px;"></div></div>
                            <div class="authorSay">
                                <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 81px;"><div id="authorSpeak" style="overflow: hidden; width: auto; height: 81px;"></div><div class="slimScrollBar" style="background: rgb(204, 204, 204); width: 7px; position: absolute; top: 0px; opacity: 1; display: block; border-radius: 0px; z-index: 99; right: 1px;"></div><div class="slimScrollRail" style="width: 7px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 7px; background: rgb(238, 238, 238); opacity: 1; z-index: 90; right: 1px;"></div></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <img id="requestLoadingTip" class="loadImg" style="display: none;" src="./回收站-阅文作家专区_files/loading.gif"></div>
        <!-- 定时发布浮层 -->
        <div id="publishPopup" class="popupWrap w380" style="display:none;">
            <a data-node="close" class="icon closePopup" href="javascript:"></a>
            <h3>章节发布</h3>
            <div class="popupBody p30">
                <div class="popupContent">
                    <ul class="send-time-list">
                        <li>
                            <em>发布章节：</em>
                            <p data-node="chapterName"></p>
                        </li>
                        <li>
                            <em>章节类型：</em>
                            <p data-node="chapterTypeName"></p>
                        </li>
                        <li>
                            <em>最新章节：</em>
                            <p>
                                                    </p>
                        </li>
                        <li>
                            <em>设置发布时间：</em>
                            <div class="setTimeBox">
                                <p class="cf">
                                        <span class="radio on">
                                            <input id="rightaway" data-node="publishTypeRadio" name="publishType" class="radioclass" type="radio" value="2">
                                        </span>
                                    <label class="fl" for="rightaway">立即发布</label><br>
                                        <span class="radio">
                                            <input id="timing" data-node="publishTypeRadio" name="publishType" class="radioclass" type="radio" value="5">
                                        </span>
                                    <label class="fl" for="timing">定时发布</label>
                                    <b class="c999">（定时发布可能会延迟10-20分钟）</b>
                                    <i id="publishDateBox" class="dateBox cf">
                                        <cite class="dateIco"></cite>
                                        <input id="publishDateInput" class="dateInput" type="text" value="">
                                    </i>
                                </p>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="confirmBtn">
                    <a id="publishBtn" class="button green full" href="javascript:">发布</a>
                </div>
            </div>
        </div>
        <!-- start 创建角色 弹窗 -->
        <div class="popup-wrap" id="createRolePopup" style="display: none;">
            <a class="close icon" href="javascript:" data-node-do-role="close"></a>
            <div class="popup-title">
                <h3>创建角色</h3>
            </div>
            <div class="popup-content">
                <div class="create-character-wrap">
                    <div class="avatar-wrap">
                        <div class="avatar-box">
                            <img src="./回收站-阅文作家专区_files/dafult_photo.png" id="roleImg">
                        </div>
                        <label class="upload-btn blue-btn" for="acUpload">修改头像</label>
                        <input id="acUpload" type="file" hidden="">
                        <p>仅支持jpg、png格式，图片大小不超过5M</p>
                        <div class="select-character" id="roleshowstatus">
                            <span class="radio on">
                                  <input name="character" class="radioclass" id="zsjs" type="radio" value="1" checked="checked">
                            </span>
                            <label for="zsjs">展示角色</label>
                            <span class="radio">
                                  <input name="character" class="radioclass" id="ycjs" type="radio" value="-1">
                            </span>
                            <label for="ycjs">隐藏角色</label>
                        </div>
                    </div>
                    <div class="character-info">
                        <div class="combo-select"><select name="roletype" id="roletype" tabindex="-1">
                            <option value="0" selected="">请选择角色类型</option>
                            <option value="4">男主</option>
                            <option value="5">女主</option>
                            <option value="6">男配</option>
                            <option value="7">女配</option>
                        </select><div class="combo-arrow"></div><dl class="combo-dropdown"><dd class="option-item option-selected" data-index="0" data-value="0">请选择角色类型</dd><dd class="option-item" data-index="1" data-value="4">男主</dd><dd class="option-item" data-index="2" data-value="5">女主</dd><dd class="option-item" data-index="3" data-value="6">男配</dd><dd class="option-item" data-index="4" data-value="7">女配</dd></dl><input type="text" value="" class="combo-input text-input"></div>
                        <input type="text" name="roleName" id="roleName" placeholder="请输入10个字以内的角色名称">

                        <textarea name="roleDesc" id="roleDesc" placeholder="请输入50个字以内的角色备注（选填）"></textarea>
                    </div>
                </div>
            </div>
            <div class="popup-btn">
                <a href="javascript:" id="roleCreateCancel" data-node-do-role="close">取消</a>
                <a href="javascript:" id="roleCreateConfirm">完成</a>
            </div>
        </div>
        <!-- end 创建角色 弹窗 -->
        <script type="text/javascript">
            var default_photo="https://img1.write.qq.com/writer/p1/contentv2/dafult_photo.png";
        </script>
        <!-- start 角色管理 有数据 -->
        <div class="popup-wrap character-control" id="roleManagePopup" style="display: none;">
            <a class="close icon" href="javascript:" data-node-man-role="close"></a>
            <div class="popup-title">
                <a class="add-character" href="javascript:">添加角色</a>
                <h3>角色管理</h3>
            </div>
            <div class="popup-content">
                <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 528px;"><div class="character-list-wrap" id="j-characterList" style="overflow: hidden; width: auto; height: 528px;">
                    <ul>

                    </ul>
                </div><div class="slimScrollBar" style="background: rgb(204, 204, 204); width: 8px; position: absolute; top: 0px; opacity: 1; display: block; border-radius: 0px; z-index: 99; right: -1px;"></div><div class="slimScrollRail" style="width: 8px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 0px; background: rgb(238, 238, 238); opacity: 1; z-index: 90; right: -1px;"></div></div>
            </div>
            <div class="popup-btn full">
                <a id="roleManageFinish" href="javascript:" data-node-man-role="close">完成</a>
            </div>
        </div>
        <!-- end 角色管理 有数据 -->

        <!-- start 删除角色二次确认 没有发言过的 -->
        <div class="popup-tip" id="roleDeletePopup" style="display: none;">
            <div class="popup-content">
                <div class="text-content">
                    <p>是否删除本角色？</p>
                </div>
            </div>
            <div class="popup-btn">
                <a id="roleDeleteCancel" href="javascript:" data-node-del-role="close">取消</a>
                <a id="roleDeleteConfirm" href="javascript:">删除</a>
            </div>

        </div>
        <!-- end 删除角色二次确认 没有发言过的 -->
        <!--新手引导-->
        <!--<div id="mask" class="mask" style="display:none;"></div>-->
        <!--<div id="joyRideTipContent" style="display:none;">-->
        <!--<ul>-->
        <!--<li data-id="numero1" data-text="下一步" class="custom">-->
        <!--<p>草稿箱用来编辑和存储待发布的章节，支持在线编辑。</p>-->
        <!--</li>-->
        <!--<li data-id="numero2" data-text="完成">-->
        <!--<p>已发布章节用来管理分卷和修改正式发布的章节。</p>-->
        <!--</li>-->
        <!--</ul>-->
        <!--</div>-->
        <script type="text/javascript" src="__PUBLIC__/writer/js/chapterRecycle.js"></script>
        <script type="text/javascript">
            $(function () {
                var CBID ={$book['id']},
                        isVipNovel = "-1",
                        chapterTmpUrl = "";
                $('#roletype').comboSelect();
                CS.page.bookManage.roleMange.init(CBID);//角色管理
                //草稿页
                CS.page.bookManage.chapterRecycle.init(CBID, isVipNovel, chapterTmpUrl);
            });
        </script>
    </div>
    {include file="public/footer" /}
<script type="text/javascript">
/*
    $(function () {
        var imgUrl = "";
        var artidx = "0";
        var selectid = "0";
        var articlename = "";

        CS.page.bookNovels.novelList.init(imgUrl,artidx,articlename,selectid);
    });*/
    $('#novelList').on('mouseenter', 'tr',
    function() {
        $(this).addClass('active').siblings('tr').removeClass('active');
    });
</script>
{/block}
{block name="script"}
{/block}


